@layout("/common/_container.html"){
<div>
    <form class="layui-form layui-elem-quote news_search">
        <div class="layui-inline">
            <a class="layui-btn layui-btn-sm" id="addRoot">添加根节点</a>
        </div>
    </form>

    <div style="margin:15px;">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md3">
                <div style="height: 462px;overflow-y:auto; ">
                    <ul id="permissionTree" class="ztree customZtree"></ul>
                </div>
            </div>
            <div class="layui-col-md9">
                <form id="permissionForm" class="layui-form layui-form-pane" lay-filter="permissionForm"
                      style="height: 462px;">
                </form>
            </div>
        </div>
    </div>

</div>

<div id="permissionTemplate" style="display: none;">
    {id}
    {pid}
    <div class="layui-form-item">
        <label class="layui-form-label">编码</label>
        <div class="layui-input-block">
            <input type="text" name="code" lay-verify="required|permissionCode" autocomplete="off"
                   class="layui-input" value="{code}"/>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" lay-verify="required|permissionName" autocomplete="off"
                   class="layui-input" value="{name}"/>
        </div>
    </div>

    <div class="layui-form-item" pane>
        <label class="layui-form-label">类型</label>
        <div class="layui-input-block">
            <input type="radio" name="type" value="1" title="目录"/>
            <input type="radio" name="type" value="2" title="菜单"/>
            <input type="radio" name="type" value="3" title="按钮"/>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">权限值</label>
        <div class="layui-input-block">
            <input type="text" name="permissionVal" lay-verify="required|permissionVal" autocomplete="off"
                   class="layui-input" value="{permissionVal}"/>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">路径</label>
        <div class="layui-input-block">
            <input type="text" name="url" required lay-verify="required" autocomplete="off"
                   class="layui-input" value="{url}"/>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">icon</label>
        <div class="layui-input-block">
            <input type="text" name="icon" autocomplete="off" class="layui-input" value="{icon}"/>
        </div>
    </div>

    <div class="layui-form-item" pane>
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="1" title="启用"/>
            <input type="radio" name="status" value="0" title="停用"/>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">序号</label>
        <div class="layui-input-block">
            <input type="text" name="seq" lay-verify="required|number" autocomplete="off"
                   class="layui-input" value="{seq}"/>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="editPermission">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</div>
<script src="${ctxPath}/static/scripts/system/permission.js"></script>
@}
